import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '日期',
    align: 'center',
    dataIndex: 'createTime',
    width: 100,
    resizable: true,
    // slots: { customRender: 'isFormat' },
  },
  {
    title: '咸鱼账号',
    align: 'center',
    dataIndex: 'sellerName',
    width: 100,
    resizable: true,
  },
  {
    title: '出单数',
    align: 'center',
    dataIndex: 'orderNum',
    width: 100,
    resizable: true,
  },
  {
    title: '营业额',
    align: 'center',
    dataIndex: 'orderTotalPrice',
    width: 100,
    resizable: true,
  },
  {
    title: '利润',
    align: 'center',
    dataIndex: 'profit',
    width: 100,
    resizable: true,
  },
  {
    title: '消耗优惠券数',
    align: 'center',
    dataIndex: 'consumeCardNum',
    width: 100,
    resizable: true,
  },
  {
    title: '单量同比增长率',
    align: 'center',
    dataIndex: 'orderNumGrowRate',
    width: 100,
    resizable: true,
    slots: { customRender: 'isFormat' },
  },
  {
    title: '利润同比增长率',
    align: 'center',
    dataIndex: 'profitGrowRate',
    width: 100,
    resizable: true,
    slots: { customRender: 'isFormat' },
  },
  {
    title: '单量环比增长',
    align: 'center',
    dataIndex: 'orderNumCircleRate',
    width: 100,
    resizable: true,
    slots: { customRender: 'isFormat' },
  },
  {
    title: '利润环比增长',
    align: 'center',
    dataIndex: 'profitCircleRate',
    width: 100,
    resizable: true,
    slots: { customRender: 'isFormat' },
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    label: '类型',
    field: 'type',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: 'diary_type',
    },
  },
  {
    field: 'createTime',
    label: '日期',
    component: 'RangePicker',
    componentProps: {
      valueFormat: 'YYYY-MM-DD',
    },
  },
];
